#include "MonitoringCheckUser.h"
#include "ui_MonitoringCheckUser.h"

MonitoringCheckUser::MonitoringCheckUser(QWidget *parent,userModel*model) :
    QWidget(parent),
    ui(new Ui::MonitoringCheckUser),
    model(model)
{
    ui->setupUi(this);
    LOG_INFO("查看用户信息");
    ui->label_2->setText(model->username);
    ui->label_4->setText(model->emial);
    if(model->role.toInt()==1){
        ui->label_5->setText("管理员");
    }else if (model->role.toInt()==2) {
        ui->label_5->setText("普通用户");
    }else {
        ui->label_5->setText("未知用户");
    }

    ui->label_7->setText(model->username);
    ui->label_9->setText(model->created_at);
}

MonitoringCheckUser::~MonitoringCheckUser()
{
    delete ui;
}
